<?php

Yii::app()->getClientScript()->registerScriptFile('http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
Yii::app()->getClientScript()->registerScriptFile( Yii::app()->request->baseUrl.'/js/jquery.anythingslider.js');
Yii::app()->getClientScript()->registerScriptFile( Yii::app()->request->baseUrl.'/js/jquery.easing.1.2.js');
Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/css/anythingslider.css');
Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/css/theme-minimalist-round.css');



Yii::app()->getClientScript()->registerScriptFile( Yii::app()->request->baseUrl.'/js/jquery.colorbox.js');


Yii::app()->getClientScript()->registerCssFile(Yii::app()->request->baseUrl.'/css/colorbox.css');
Yii::app()->getClientScript()->registerScriptFile( Yii::app()->request->baseUrl.'/js/nav.js');
?>
<?php 

/* @var $this RootController */
/* @var $model Root */


$this->breadcrumbs=array(
	'词根'=>array('index'),
	$model->root,
);

// $this->menu=array(
// 	array('label'=>'List Root', 'url'=>array('index')),
// 	array('label'=>'Create Root', 'url'=>array('create')),
// 	array('label'=>'Update Root', 'url'=>array('update', 'id'=>$model->id)),
// 	array('label'=>'Delete Root', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
// 	array('label'=>'Manage Root', 'url'=>array('admin')),
// );
?>

<h1><?php echo $model->root; ?>
<?php if(!Yii::app()->user->isGuest){ echo  CHtml::link(CHtml::encode("添加单词"), array('root/addWord', 'id'=>$model->id));}?>
</h1>

<?php echo CHtml::encode($model->info); ?><br/>
<?php echo CHtml::encode($model->detail); ?>
<p class="hint">可以使用左右方向键（←→）浏览</p>
<div class="sliderbox">
<ul id="slider1" data-url="<?php echo CHtml::normalizeUrl(array('root/moreWord'))?>" data-id="<?php echo $model->id;?>">
<?php 

//print_r($_SERVER['REQUEST_URI']);exit;
foreach($model->getrootwords() as $info){

 	echo $this->renderPartial('/wordRoot/_review', array('data'=>$info)); 	//echo $info->id;
	
}
?>	</ul>
</div>